package lesson

import (
	"context"
	"server/internal/consts"
	"server/internal/service"

	"server/api/lesson/file"
)

func (c *ControllerFile) Upload(ctx context.Context, req *file.UploadReq) (res *file.UploadRes, err error) {
	res = new(file.UploadRes)
	res.Detail, err = service.File().FileUpload(ctx, req.File, consts.FileUploadStorageTypeAliYunOss, "lessonVoice", 0)
	return
}
